package com.wang.springbootinit.aop;

import com.wang.springbootinit.model.entity.User;

public class ContextUtil {
    private static ThreadLocal<User> localVar = new ThreadLocal<>();

    public static void setUser(User user) {
        localVar.set(user);
    }

    public static User getUser() {
        return localVar.get();
    }

    public static void remove() {
        localVar.remove();
    }
}
